The present invention relates to the art of industrial controllers, and more particularly to a method and apparatus for providing an output value to an output device.
Industrial controllers are special purpose computers used for controlling industrial processes, manufacturing equipment, and other factory automation. In accordance with a control program, the industrial controller measures one or more process variables or inputs reflecting the status of a controlled process, and changes outputs effecting control of the process. The inputs and outputs may be binary, (e.g., on or off), as well as analog inputs and outputs assuming a continuous range of values. The control program may be executed in a series of execution cycles with batch processing capabilities.
The measured inputs received from a controlled process and the outputs transmitted to the process generally pass through one or more input/output (I/O) modules. These I/O modules serve as an electrical interface between the controller and the controlled process, and may be located proximate or remote from the controller. The inputs and outputs are recorded in an I/O table in processor memory. Input values may be asynchronously read from the controlled process by one or more input modules and output values are written directly to the I/O table by the processor for subsequent communication to the process by specialized communications circuitry. An output module may interface directly with a controlled process, by providing an output from an I/O table to an actuator such as a valve, solenoid, and the like.
During execution of the control program, values of the inputs and outputs exchanged with the controlled process pass through the I/O table. The values of inputs in the I/O table are asynchronously updated from the controlled process by dedicated scanning circuitry. This scanning circuitry may communicate with input modules over a bus on a backplane or network communications. The scanning circuitry also asynchronously writes values of the outputs in the U/O table to the controlled process. The output values from the I/O table are then communicated to one or more output modules for interfacing with the process. Thus, the processor may simply access the I/O table rather than needing to communicate directly with the controlled process.
An industrial controller may be customized to a particular process by writing control software that may be stored in the controller""s memory and/or by changing the hardware configuration of the controller to match the control task. Controller hardware configuration is facilitated by separating the industrial controller into a number of control modules, each of which performing a different function. Particular control modules needed for the control task may then be connected together on a common backplane within a rack. The control modules may include processors, power supplies, network communication modules, and I/O modules exchanging input and output signals directly with the controlled process. Data may be exchanged between modules using a backplane communications bus, which may be serial or parallel. A typical hardware modification may involve adding additional I/O modules so as to be able to control additional equipment.
Various control modules of the industrial controller may be spatially distributed along a common communication link in several racks. Certain I/O modules may thus be located in close proximity to a portion of the control equipment, and away from the remainder of the controller. Data is communicated with these remote modules over a common communication link, or network, wherein all modules on the network communicate using a standard communications protocol.
In a typical distributed control system, one or more output modules are provided for interfacing with a process. The outputs derive their control or output values in the form of a message from a master or peer device over a network or a backplane. For example, an output module may receive an output value from a processor, such as a programmable logic controller (PLC), via a communications network or a backplane communications bus. The desired output value is generally sent to the output module in a message, such as an I/O message. The output module receiving such a message will provide a corresponding output (analog or digital) to the controlled process.
Conventional output module devices are typically provided an output value solely through network messages, and some may go to a known state or hold the last value upon a network communication fault. For example, the module provides an output according to an output value received in an I/O message from a master (e.g., a PLC), and will maintain that value during normal operation until another message is received or a network communications fault occurs. However, there are many conditions or events for which it may be desirable to provide another output value to the device. Heretofore, the source of an output value was determined according to fixed controller architecture constraints. Thus a user had limited ability to define output device behavior in lieu of regular I/O messages.
In accordance with the present invention, there is provided a method and apparatus which allows a user to define an output device behavior in a variety of status and/or event circumstances via creating a binding or logical connection between a logic function and one or more status/event indicators. Whereas conventional output devices provided only a limited capability to define output states in the presence of a network communication fault, the present invention provides for user-defined output behavior through linking a logical function with system and module status/event indicators, whereby the output value may be determined according to the status/event indicators and user-defined function blocks.
According to one aspect of the invention, there is provided a method for providing an output value for an output which comprises associating the output with a logic function in communication with a network, associating the logic function with an indicator, and selectively providing an output value to the output from one of the logic function and a network value message, according to the logic function. The logic function may take into account, for example, information relating to the status or health of the output device, network status, and/or the health or status of one or more devices on the network. In this regard, the method may include receiving a status message from the network, receiving a value message from the network, and updating the indicator according to the status message and/or the status of the device.
A status message may comprise information relating to the status of the network and/or other modules or devices on the network, including the value of one or more hardware inputs or outputs. Thus, the method allows a user-defined logic function to take various status and event information into account in setting the output value. In addition to status information, event information may be considered by the logic function in determining the output value. Such event information may include, for example, the occurrence of faults in a system. The invention allows a user to define which status/event indicators will be used by the logic function, and further to define the logic function. In this way, a user has significantly more design flexibility than was possible with conventional output modules.
According to another aspect of the present invention, an output device comprises an output providing an output signal according to an output value, a communication interface adapted to receive messages from a network, an indicator adapted to receive message information from the communication interface and providing indicator data, and a logic unit which receives message information from the communication interface and indicator data from the indicator, and which performs a logic function. The logic unit selectively provides the output value to the output according to either the message information or the logic function.
The logic unit may thus take into account indicator data in determining the output value for the device, which was not previously available. In this regard, the indicator data may include, for example, an I/O connection health indicator, a messaging connection health indicator, an I/O connection error indicator, a run event indicator, and idle event indicator, a network error indicator, an I/O point fault indicator, a hardware input indicator, a hardware output indicator, and I/O data. The device allows a user to define both the status/event indicators which will be considered, as well as the decisional logic used in providing an output value to the output of the device. The logic unit, for example, may comprise a processor or other logic device, which may be configured by a user to perform various functions, such as boolean operations, flip-flops, counters, and/or timers.
According to another aspect of the invention, a method is provided for defining output behavior in an output device, comprising defining a logical function using one or more function blocks, linking the logical function with at least one status/event indicator, and providing an output value according to the logic function and the at least one status/event indicator. The status/event indicator may comprise information relating to the status of one or more devices on a network. This information may include, for example, an I/O connection health indicator, a messaging connection health indicator, an I/O connection error indicator, a run event indicator, and idle event indicator, a network error indicator, an I/O point fault indicator, a hardware input indicator, a hardware output indicator, and I/O data. In addition, defining the logical function using one or more function blocks may comprise, for example, configuring the function blocks to implement one or more of boolean operations, flip-flops, counters, and a timers using a network configuration tool. In this way, a user may program or configure an output device, such as an output module, to perform various logical functions depending on the status of one or more network devices, in order to generate an output value. This method provides the user with significant control system design flexibility not previously possible with conventional output devices.
To the accomplishment of the foregoing and related ends, the invention, then, comprises the features hereinafter fully described. The following description and the annexed drawings set forth in detail certain illustrative embodiments of the invention. However, these embodiments are indicative of but a few of the various ways in which the principles of the invention may be employed. Other aspects, advantages and novel features of the invention will become apparent from the following detailed description of the invention when considered in conjunction with the drawings.